<?php
declare(strict_types=1);

namespace app\common\model\delivery;

use app\common\model\base\BaseModel;
use app\common\model\base\ConstTraits;

class ShopGoods Extends BaseModel
{
    use ConstTraits;

    const GOODSTYPE=[
        'entity'=>'实体商品',
        'coupon'=>'卡券商品'
    ];

    public function coupon()
    {
        return $this->hasOne(Coupon::class,'id','coupon_id');
    }

    public function channel()
    {
        return $this->hasOne(Channel::class,'id','channel_id');
    }
}
